package com.fourpigeon.dao;

import com.fourpigeon.domain.AgreeInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

/**
 * 约球信息
 * 数据库操作
 */
@Mapper
@Repository
public interface AgreeInfoDao {
    @Select("select * from tb_agree_info where id = #{id}")
    public AgreeInfo getById(Integer id);
    @Select("select * from tb_agree_info where blogId = #{blogId}")
    public AgreeInfo getByBlogId(Integer blogId);
    @Select("select * from tb_agree_info")
    public List<AgreeInfo> getAll();
    @Insert("insert into tb_agree_info values(#{id},#{userId},#{blogId},#{createTime},#{updateTime})")
    public boolean save(AgreeInfo agreeInfo);
    @Delete("delete from tb_agree_info where id = #{id}")
    public boolean delete(Integer id);
}
